﻿using Commands.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Commands
{
    class MethodInformation
    {
        public MethodInformation(ICommandsList methodManager, MethodInfo method)
        {
            this.ParentList = methodManager;
            this.MethodInfo = method;

            ParametersNames = new List<string>();
            MethodsNames = new List<string>();

            var namesAttributes = method.GetCustomAttributes(typeof(RemoteCommand), false);
            foreach (RemoteCommand pseudoNameAttribute in namesAttributes)
                MethodsNames.AddRange(pseudoNameAttribute.Names);

            //TODO PARAMETERS names
        }

        public MethodInfo MethodInfo { get; private set; }
        public ICommandsList ParentList { get; private set; }
        public List<string> MethodsNames { get; private set; }
        public List<string> ParametersNames { get; private set; }
    }
}
